<?php
/**
 * 
 *
 * @author Mike Gao
 */
class Gift_ruleViewModel extends ViewModel{
    protected $pk  = 'Gift_rule.id';

    public $viewFields = array(
    	'Gift_rule' => array('*'),
        //'Warehouse' => array('name'=>'wname', '_on' => 'Sale.warehouse_id = Warehouse.id'),
        'Common_product' => array('name', '_on' => 'Gift_rule.common_product_id = Common_product.id'),
        //'Sale_detail' => array('id'=>'did','number', 'price','lot','exp','total'=>'dtotal','create_time'=>'dctime','update_time'=>'dutime','_on' => 'Sale.id = Sale_detail.sale_id'),
        //'Product' => array('id'=>'pid', 'name', 'tm','unit_id','cat_id','cost_default','minstock','_on' => 'Sale_detail.product_id = Product.id'),
        
    );


}
?>
